﻿@model IEnumerable<Clirelmgt.Models.ObjectModel>

@{
    ViewBag.Title = "Objects";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}


<div class="dashboard-wrapper">
    <div class="left-sidebar">
        <div class="row-fluid">
                        <div class="span12">
                            <div class="widget">
                                <div class="widget-header">
                                    <div class="title">
                                        Quick Access
                     
                                    </div>
                                </div>
                                <div class="widget-body">
                                    <div class="row-fluid">
                                        <div class="metro-nav">
                                            <div class="metro-nav-block nav-block-yellow">
                                                <a href="/Module/Objects">
                                                    <div class="fs1" aria-hidden="true" data-icon="&#xe0a0;"></div>
                                                    <div class="brand">
                                                        All Objects
                                                    </div>
                                                </a>
                                            </div>
                                            <div class="metro-nav-block nav-block-blue double">
                                                <a href="/Module/Objects?type=table">
                                                    <div class="fs1" aria-hidden="true" data-icon="&#xe14a;"></div>
                                                    <div class="brand">
                                                        Tables
                                                    </div>
                                                </a>
                                            </div>
                                            <div class="metro-nav-block nav-block-green">
                                                <a href="/Module/Objects?type=list">
                                                    <div class="fs1" aria-hidden="true" data-icon="&#xe0b8;"></div>
                                                    <div class="brand">
                                                        List Pages
                                                    </div>
                                                </a>
                                            </div>
                                            <div class="metro-nav-block nav-block-red">
                                                <a href="/Module/Objects?type=card">
                                                    <div class="fs1" aria-hidden="true" data-icon="&#xe0a9;"></div>
                                                    <div class="brand">
                                                        Card Pages
                                                    </div>
                                                </a>
                                            </div>
                                            
                                           
                                        </div>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
        <div class="row-fluid">
            <div class="span12">
                <div class="widget">
                    <div class="widget-header">
                        <div class="title">
                            List of application objects
                        </div>
                        <span class="tools">
                        </span>
                    </div>
                    <div class="widget-body">
                        <table class="table table-condensed table-striped table-bordered table-hover no-margin">
                            <thead>
                                <tr>
                                    <th>Name</th>
                                    <th>Object Type</th>
                                    <th>Module Name</th>
                                    <th>Linked Table</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach (var module in Model)
                                {
                                    <tr>
                                        <td>
                                            @module.Name
                                        </td>
                                        <td>
                                            @module.ObjectType
                                        </td>
                                        <td>
                                            @module.ModuleName
                                        </td>
                                        <td>
                                            @module.LinkTable
                                        </td>
                                        <td class="hidden-phone">

                                            <div class="btn-group">
                                                <button data-toggle="dropdown" class="btn btn-mini dropdown-toggle">
                                                    Action 
                                                <span class="caret"></span>
                                                </button>
                                                <ul class="dropdown-menu">
                                                    <li>
                                                        <a href="/Module/Card/@module.ModuleID">Edit
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="/Module/Object/@module.ModuleID">Objects
                                                        </a>
                                                    </li>
                                                    @if(!module.IsStandard)
                                                    {
                                                    <li>
                                                        <a href="/Module/Delete/@module.ModuleID">Delete
                                                        </a>
                                                    </li>
                                                    }
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div class="right-sidebar">

        <div class="wrapper">
              <a href="/Object/CreateTable" class="btn btn-block btn-info" type="button">
                Create New Table
              </a>
            </div>
            <div class="wrapper">
              <a href="/Object/CreateListPage" class="btn btn-block btn-success" type="button">
                Create New List Page
              </a>
            </div>
            <div class="wrapper">
              <a href="/Object/CreateCardPage" class="btn btn-block btn-warning2" type="button">
                Create New Card Page
              </a>
        </div>

        <hr class="hr-stylish-1">


    </div>
</div>